package com.jpx.jxcbiz.web;


import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.jpx.common.dto.SaleDto;
import com.jpx.common.dto.TypeDto;
import com.jpx.common.vo.ResultEntity;
import com.jpx.jxcbiz.entity.TGoodstype;
import com.jpx.jxcbiz.service.ITGoodstypeService;
import com.jpx.jxcbiz.service.ITSaleListGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Mht
 * @since 2020-02-24
 */
@RestController
@RequestMapping("/biz/tSaleListGoods")
public class TSaleListGoodsController {

    @Autowired
    ITSaleListGoodsService saleListGoodsService;

    @RequestMapping("/getSaleList")
    public ResultEntity getSaleList(SaleDto saleDto){
        List<SaleDto> saleList = saleListGoodsService.getSaleList(saleDto);
        return ResultEntity.ok(saleList);
    }
    @Autowired
    ITGoodstypeService goodstypeService;

    @RequestMapping("/getTypeList")
    public ResultEntity getTypeList(){
        List<TypeDto> typeList = goodstypeService.getList();
        return ResultEntity.ok(typeList);
    }

}
